package com.gylang.commons.api.valid;


import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author gylang
 * data 2020/9/4
 * @version v0.0.1
 */
@Documented
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface NotNullAndPattern {

    /**
     * @return the regular expression to match
     */
    String regexp();

    /**
     * @return array of {@code Flag}s considered when resolving the regular expression
     */

    /**
     * @return the error message template
     */
    String message() default "{javax.validation.constraints.Pattern.message}";

    /**
     * @return the groups the constraint belongs to
     */
    Class<?>[] groups() default { };
    /**
     * @return the payload associated to the constraint
     */
    Class<? extends Payload>[] payload() default {};
}
